package com.apes.fn.fico.reimbursement.repository;

import com.apes.fn.fico.reimbursement.model.Reimbursement;
import com.apes.framework.jpa.repository.CustomRepository;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
import java.util.Map;

/**
 * Created by lishikun on 2021/1/27 11:25
 */
public interface ReimbursementRepository extends CustomRepository<Reimbursement, String> {
    @Query("select distinct new map(t.accountBankName as accountBankName,t.accountBankNumber as accountBankNumber ,t.accountBank as accountBank,t.subbranch as subbranch)  from ReimbursementItem t  where t.partyRole.id =?1")
    Page<Map> findByEmployee(String employeeId,  Pageable pageable);
}
